How to get Type[] of all classes a class extends
Posted
by Jeff Dahmer
on Stack Overflow
See other posts from Stack Overflow
or by Jeff Dahmer
Published on 2010-04-01T09:46:26Z
Indexed on
2010/04/01
9:53 UTC
Read the original article
Hit count: 117
You can do Type[] interfaces = typeof(MyClass).GetInterfaces();
to get a list of everything a class implements implements.
I am wondering if there is anyway to crawl the "extends" tree to see all the base types a class inherits, i.e. abstract classes etc.?
© Stack Overflow or respective owner